<template>
  <div class="home">
    <div class="block">
    <el-carousel height="460px">
      <el-carousel-item v-for="item in carousel" :key="item.carousel_id">
        <img style="height:460px;" :src="$target + item.imgPath" :alt="item.describes" />
      </el-carousel-item>
    </el-carousel>
  </div>
  <div class="main-box">

  </div>
  </div>
</template>

<script>

export default {
  name: 'HomeView',
  data(){
    return{
      carousel:[]
    }
  },
  created(){
    this.getLunboTu()
  },
  methods:{
    async getLunboTu(){
      const {data:res}=await this.$axios.post("/api/resources/carousel", {})
      console.log('res',res);
      this.carousel=res.carousel
    }
  },
  components: {
  
  }
}
</script>,
<style lang="less" scoped>
.block {
  margin: 0 auto;
  max-width: 1225px;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
.main-box{
background-color: #f5f5f5;
padding-bottom: 20px;
}
</style>
